﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Prototype.Dialogs
{
    public partial class SplashDialog : Form
    {
        protected SplashDialogResult result = SplashDialogResult.NONE;
        public SplashDialogResult Result
        {
            get { return result; }
        }

        public SplashDialog()
        {
            InitializeComponent();
        }

        // Cursor is over new project button
        private void picNewProject_MouseEnter(object sender, EventArgs e)
        {
            // Change from greyscale image to colour
            picNewProject.Image = Properties.Resources.SplashNew;
            // Inform the player what this button does
            lblHelpTip.Text = "Create a New Project";
        }

        // Cursor has been moved away from new project button
        private void picNewProject_MouseLeave(object sender, EventArgs e)
        {
            // Change from colour image to greyscale
            picNewProject.Image = Properties.Resources.SplashNewGrey;
            lblHelpTip.Text = "Thank you for using Prototype Editor =]";
        }

        // New project button has been clicked
        private void picNewProject_Click(object sender, EventArgs e)
        {
            result = SplashDialogResult.NEWPROJECT;
            Close();
        }

        // Cursor is over open project button
        private void picOpenProject_MouseEnter(object sender, EventArgs e)
        {
            // Change from greyscale image to colour
            picOpenProject.Image = Properties.Resources.SplashOpen;
            // Inform the player what this button does
            lblHelpTip.Text = "Open an Existing Project";
        }

        // Cursor has been moved away from open project button
        private void picOpenProject_MouseLeave(object sender, EventArgs e)
        {
            // Change from colour image to greyscale
            picOpenProject.Image = Properties.Resources.SplashOpenGrey;
            lblHelpTip.Text = "Thank you for using Prototype Editor =]";
        }

        // Cursor is over view help button
        private void picViewHelp_MouseEnter(object sender, EventArgs e)
        {
            // Change from greyscale image to colour
            picViewHelp.Image = Properties.Resources.SplashHelp;
            // Inform the player what this button does
            lblHelpTip.Text = "View Help and Tutorials";
        }

        // Cursor has been moved away from view help button
        private void picViewHelp_MouseLeave(object sender, EventArgs e)
        {
            // Change from colour image to greyscale
            picViewHelp.Image = Properties.Resources.SplashHelpGrey;
            lblHelpTip.Text = "Thank you for using Prototype Editor =]";
        }

        // Close button clicked
        private void CloseSplash_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        // Cursor is over view help button
        private void CloseSplash_MouseEnter(object sender, EventArgs e)
        {
            // Change from colour image to greyscale
            CloseSplash.Image = Properties.Resources.SplashClose;
            lblHelpTip.Text = "Close Splash";
        }

        // Cursor has been moved away from view help button
        private void CloseSplash_MouseLeave(object sender, EventArgs e)
        {
            // Change from colour image to greyscale
            CloseSplash.Image = Properties.Resources.SplashCloseGrey;
            lblHelpTip.Text = "Thank you for using Prototype Editor =]";
        }
    }

    public enum SplashDialogResult
    {
        NEWPROJECT, OPENPROJECT, VIEWHELP, NONE
    }
}
